package pers.cj.pdos.service;

import com.baomidou.mybatisplus.extension.service.IService;
import pers.cj.pdos.entity.Custom;
import pers.cj.pdos.entity.CustomType;
import pers.cj.pdos.entity.Provider;
import pers.cj.pdos.entity.ProviderType;
import pers.cj.pdos.vo.CustomVo;
import pers.cj.pdos.vo.ProviderVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenj
 * @since 2019-12-12
 */
public interface IProviderService extends IService<Provider> {

    boolean checkName(String companyId, String name);

    boolean checkNo(String companyId, String no);

    List<ProviderVo> listVoForInit(String companyId, Integer page, Integer limit, String search);

    Long countForInit(String companyId,String search);

    List<ProviderVo> listVoPage(String companyId,
                                Integer page,
                                Integer limit,
                                Integer status,
                                String search,
                                String providerTypeId,
                                String no,
                                String name,
                                String unitTel,
                                String phone,
                                String contacts,
                                String remark,
                                String storeId);

    long count(String companyId,
               Integer status,
               String search,
               String providerTypeId,
               String no,
               String name,
               String unitTel,
               String phone,
               String contacts,
               String remark,
               String storeId);

    void update(Provider provider);

    void batchChangeType(String providerTypeId, List<Provider> list);

    Map<String,Long> check(List<Provider> providerList);

    void deleteBatch(List<Provider> list);

    void insert(List<Provider> providerList, List<ProviderType> providerTypeList);

    List<ProviderVo> listVo(String companyId);

    List<ProviderVo> listVoByIds(List<String> ids);

    Provider getDefault(String storeId);
}
